package chapter4_5;

/**
 * 数组学习
 * @author dmc
 */


public class ArrayTest {
   // static int [] number;   // 空指针java.lang.NullPointerException
    public static void main(String[] args) {
      //  int [] number;
        int [] number = new int[5];
        number[0]= 5;
        number[1]= 6;
        number[2]= 7;
        number[3]= 8;
        number[4]= 9;
        // 数组不能越界
        //number[7]= 1;

        int [] numbers = {2,3,4,5,6,7};
        System.out.println(numbers[5]);



//        System.out.println(number[4]);


    }
}
